This is a simple application to demonstrate the use of Binary Space Partitioning (BSP) Trees for hidden surface removal and Solid Modelling.
The instructions are simple. Before you run the demonstration application, you should put the Thread Manager extension in your System Folder. This extension can be found in the "Put in System Folder" folder. When you run the application, you will see a window displaying the geometry of the image. Click in the contents of the window to rotate the object using an implementation of Ken Shoemake's ArcBall. You can quit at any time by selecting "Quit" from the "File" menu.
This application is a "fat" application. It requires a PowerPC or a 68020 and FPU. If you don't have a machine that meets these criteria, the application will not work properly.
About the Source Code
The source provided is a series of three Metrowerks CodeWarrior 7 projects (both 68k and PPC) which implement the Macintosh application core, the graphics library, and finally, this application. In total, six project files are provided. The code is not intended to present a model application, nor is it intended to be the most efficient possible. Please report any bugs to Bretton Wade at the address below.
Change Log
v1.2 Update to CodeWarrior 7. Code changes include adding a const declaration to the operator '=' function for the polyptr_3d class, and uncommenting the point containment routine in the polygon_3d class. Resources were updated to reflect the new version number and my new e-mail address.
v1.1 Update to CodeWarrior 6. Changes include moving the widget class member "region" to public, because other classes used it, removing the &s from the polygon_3d normal computation routine, and commenting out the point containment routine in the polygon_3d class. The last two changes are because of an internal compiler error in the inital release of CW6 on these two functions, cause unknown.
To find out more about BSP Trees, look at the BSP Tree Frequently Asked Questions (FAQ) document included with this distribution. The most recent version of the faq is available at the URL:
http://www.qualia.com/bspfaq/
or by sending e-mail to bspfaq@qualia.com, with a subject line of "SEND BSP TREE TEXT" for a plain text copy, or "SEND BSP TREE HTML" for an HTML formatted copy.